Five years ago, pharmaceutical company Moderna (MRNA 6.42%) was mostly unknown. It was developing vaccines that induce human immune cells to more effectively fight disease. But the science of DNA-based drugs was on the experimental fringe of the biopharma landscape. Not too many investors were looking to make such a bet.

Then the COVID-19 pandemic materialized. As it turns out, the coronavirus was the ideal target for Moderna's biotechnology. In December 2020, the U.S. Food and Drug Administration approved its COVID vaccine for emergency use. Other nations' regulatory bodies followed suit.

The rest, as they say, is history.

Pandemic-prompted gains

For the record, the market was already pushing Moderna shares higher before its COVID-19 vaccine was first approved. Shares nearly quintupled in calendar 2020, and ultimately rallied nearly 500% from 2019's low to their 2021 peak. As might have been expected though, the effective end of the pandemic led to the deflation of bullish interest in this stock. Moderna shares are now valued at a mere one-fourth of their 2021 high.

Nevertheless, had you taken a flier on this quirky biopharma company's stock five years ago, a $1,000 investment then would still be worth roughly $4,900 today.

That's a top-notch result, of course. Just keep in mind that the bulk of the heavy lifting was done by a completely unpredictable pandemic. Were it not for that black swan event, Moderna would very likely remain a mostly unknown name.

Still, if nothing else, the pandemic proved the company's underlying science has potential.

Moderna stock isn't for everybody, but...

More important now, interested investors should know this company's brief but brilliant swing to a profit during the COVID-19 pandemic has since evaporated. Moderna's back in the red, and is expected to remain so for at least a few more years. That makes owning this name tricky, as it will almost certainly remain volatile.

If you can stomach the risk though, there's a bullish case to be made here. The progress toward 2027's expected swing back to profitability could prove a tailwind for the stock.